std::log

From Cppreference

Jump to: navigation, search
Defined in header <cmath>

float       log( float arg );

double      log( double arg );

long double log( long double arg );

Computes the natural (base e) logarithm of arg.

Parameters

arg - floating point value

Return value

natural logarithm of arg.

Domain error occurs if arg is negative. ​NAN​ is returned in that case.

Range error occurs if arg is 0. -HUGE_VAL is returned in that case.

See also

exp
returns e raised to the given power
(function)
log10
common logarithm (to base 10)
(function)
pow
returns the given number raised to the given power
(function)
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox
In other languages